import request from '@/utils/request'

// 查询店铺列表列表
export function listShop(query) {
  return request({
    url: '/shop/shop/list',
    method: 'get',
    params: query
  })
}

// 查询店铺列表详细
export function getShop(shopsId) {
  return request({
    url: '/shop/shop/' + shopsId,
    method: 'get'
  })
}

// 新增店铺列表
export function addShop(data) {
  return request({
    url: '/shop/shop',
    method: 'post',
    data: data
  })
}

// 修改店铺列表
export function updateShop(data) {
  return request({
    url: '/shop/shop',
    method: 'put',
    data: data
  })
}

// 删除店铺列表
export function delShop(shopsId) {
  return request({
    url: '/shop/shop/' + shopsId,
    method: 'delete'
  })
}

// 根据姓名获取店铺id
export function getShopByShopUser(shopUser) {
  return request({
    url: '/shop/shop/shopUser/' + shopUser,
    method: 'get'
  })
}
